﻿using CPPEI.Coolzon.UI.Data;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace CPPEI.Coolzon.UI.Event
{
    /// <summary>
    /// 打开场景事件
    /// </summary>
    [Obsolete("请使用Event.Core.CoreOpenSceneEvent", true)]
    public class OpenSceneEvent
    {
        /// <summary>
        /// 是否是本地事件，如果不是本地事件则会发送到服务器端，然后转发,默认为false
        /// </summary>
        public bool IsLocalEvent { get; set; }
        /// <summary>
        /// 打开模式
        /// </summary>
        public SwitchMode SwitchMode;
        /// <summary>
        /// 框架名
        /// </summary>
        public string FrameName;
        /// <summary>
        /// 场景名
        /// </summary>
        public string SceneName;
        /// <summary>
        /// 打开场景事件参数
        /// </summary>
        public OpenSceneArgs Args;

        public OpenSceneEvent(SwitchMode switchMode, string frameName, string sceneName,
            OpenSceneArgs args)
        {
            this.SwitchMode = switchMode;
            this.FrameName = frameName;
            this.SceneName = sceneName;
            this.Args = args;
        }

        public OpenSceneEvent(bool isLocal, SwitchMode switchMode, string frameName, string sceneName,
            OpenSceneArgs args)
        {
            this.SwitchMode = switchMode;
            this.FrameName = frameName;
            this.SceneName = sceneName;
            this.Args = args;
            IsLocalEvent = isLocal;
        }
    }
}
